drop down list razor example

49

drop down list razor example -

[BindProperty]public int SelectedTag { get; set; };public SelectList TagOptions { get; set; }public void OnGet(){    TagOptions = new SelectList(_tagService.GetTags(), nameof(Tag.TagId), nameof(Tag.TagName));    SelectedTag = 5;}

Comments

Submit
0 Comments